determining the best order to present